3.24 \(\int \frac{(e x)^m (a+b x^n) (A+B x^n)}{c+d x^n} \, dx\)

Optimal. Leaf size=122 \[ \frac{(e x)^{m+1} (b c-a d) (B c-A d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right )}{c d^2 e (m+1)}-\frac{(e x)^{m+1} (-a B d-A b d+b B c)}{d^2 e (m+1)}+\frac{b B x^{n+1} (e x)^m}{d (m+n+1)} \]

[Out]

(b*B*x^(1 + n)*(e*x)^m)/(d*(1 + m + n)) - ((b*B*c - A*b*d - a*B*d)*(e*x)^(1 + m))/(d^2*e*(1 + m)) + ((b*c - a*
d)*(B*c - A*d)*(e*x)^(1 + m)*Hypergeometric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c*d^2*e*(1 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.126177, antiderivative size = 122, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {570, 20, 30, 364} \[ \frac{(e x)^{m+1} (b c-a d) (B c-A d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right )}{c d^2 e (m+1)}-\frac{(e x)^{m+1} (-a B d-A b d+b B c)}{d^2 e (m+1)}+\frac{b B x^{n+1} (e x)^m}{d (m+n+1)} \]

Antiderivative was successfully verified.

[In]

Int[((e*x)^m*(a + b*x^n)*(A + B*x^n))/(c + d*x^n),x]

[Out]

(b*B*x^(1 + n)*(e*x)^m)/(d*(1 + m + n)) - ((b*B*c - A*b*d - a*B*d)*(e*x)^(1 + m))/(d^2*e*(1 + m)) + ((b*c - a*
d)*(B*c - A*d)*(e*x)^(1 + m)*Hypergeometric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c*d^2*e*(1 + m))

Rule 570

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_))^
(r_.), x_Symbol] :> Int[ExpandIntegrand[(g*x)^m*(a + b*x^n)^p*(c + d*x^n)^q*(e + f*x^n)^r, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, m, n}, x] && IGtQ[p, -2] && IGtQ[q, 0] && IGtQ[r, 0]

Rule 20

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(b^IntPart[n]*(b*v)^FracPart[n])/(a^IntPart[n
]*(a*v)^FracPart[n]), Int[u*(a*v)^(m + n), x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
&&  !IntegerQ[m + n]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{(e x)^m \left (a+b x^n\right ) \left (A+B x^n\right )}{c+d x^n} \, dx &=\int \left (\frac{(-b B c+A b d+a B d) (e x)^m}{d^2}+\frac{b B x^n (e x)^m}{d}+\frac{(-b c+a d) (-B c+A d) (e x)^m}{d^2 \left (c+d x^n\right )}\right ) \, dx\\ &=-\frac{(b B c-A b d-a B d) (e x)^{1+m}}{d^2 e (1+m)}+\frac{(b B) \int x^n (e x)^m \, dx}{d}+\frac{((b c-a d) (B c-A d)) \int \frac{(e x)^m}{c+d x^n} \, dx}{d^2}\\ &=-\frac{(b B c-A b d-a B d) (e x)^{1+m}}{d^2 e (1+m)}+\frac{(b c-a d) (B c-A d) (e x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{d x^n}{c}\right )}{c d^2 e (1+m)}+\frac{\left (b B x^{-m} (e x)^m\right ) \int x^{m+n} \, dx}{d}\\ &=\frac{b B x^{1+n} (e x)^m}{d (1+m+n)}-\frac{(b B c-A b d-a B d) (e x)^{1+m}}{d^2 e (1+m)}+\frac{(b c-a d) (B c-A d) (e x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{d x^n}{c}\right )}{c d^2 e (1+m)}\\ \end{align*}

Mathematica [A]  time = 0.146505, size = 95, normalized size = 0.78 \[ \frac{x (e x)^m \left (\frac{(b c-a d) (B c-A d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{d x^n}{c}\right )}{c (m+1)}+\frac{a B d+A b d-b B c}{m+1}+\frac{b B d x^n}{m+n+1}\right )}{d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((e*x)^m*(a + b*x^n)*(A + B*x^n))/(c + d*x^n),x]

[Out]

(x*(e*x)^m*((-(b*B*c) + A*b*d + a*B*d)/(1 + m) + (b*B*d*x^n)/(1 + m + n) + ((b*c - a*d)*(B*c - A*d)*Hypergeome
tric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c*(1 + m))))/d^2

________________________________________________________________________________________

Maple [F]  time = 0.347, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( ex \right ) ^{m} \left ( a+b{x}^{n} \right ) \left ( A+B{x}^{n} \right ) }{c+d{x}^{n}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n),x)

[Out]

int((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -{\left ({\left (b c d e^{m} - a d^{2} e^{m}\right )} A -{\left (b c^{2} e^{m} - a c d e^{m}\right )} B\right )} \int \frac{x^{m}}{d^{3} x^{n} + c d^{2}}\,{d x} + \frac{B b d e^{m}{\left (m + 1\right )} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )} +{\left (A b d e^{m}{\left (m + n + 1\right )} -{\left (b c e^{m}{\left (m + n + 1\right )} - a d e^{m}{\left (m + n + 1\right )}\right )} B\right )} x x^{m}}{{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

-((b*c*d*e^m - a*d^2*e^m)*A - (b*c^2*e^m - a*c*d*e^m)*B)*integrate(x^m/(d^3*x^n + c*d^2), x) + (B*b*d*e^m*(m +
 1)*x*e^(m*log(x) + n*log(x)) + (A*b*d*e^m*(m + n + 1) - (b*c*e^m*(m + n + 1) - a*d*e^m*(m + n + 1))*B)*x*x^m)
/((m^2 + m*(n + 2) + n + 1)*d^2)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (B b x^{2 \, n} + A a +{\left (B a + A b\right )} x^{n}\right )} \left (e x\right )^{m}}{d x^{n} + c}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

integral((B*b*x^(2*n) + A*a + (B*a + A*b)*x^n)*(e*x)^m/(d*x^n + c), x)

________________________________________________________________________________________

Sympy [C]  time = 9.55414, size = 666, normalized size = 5.46 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**m*(a+b*x**n)*(A+B*x**n)/(c+d*x**n),x)

[Out]

A*a*e**m*m*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c*n**2*gamma(m/n + 1 + 1/
n)) + A*a*e**m*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c*n**2*gamma(m/n + 1
+ 1/n)) + A*b*e**m*m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*
n**2*gamma(m/n + 2 + 1/n)) + A*b*e**m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m
/n + 1 + 1/n)/(c*n*gamma(m/n + 2 + 1/n)) + A*b*e**m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1
+ 1/n)*gamma(m/n + 1 + 1/n)/(c*n**2*gamma(m/n + 2 + 1/n)) + B*a*e**m*m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I
*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*n**2*gamma(m/n + 2 + 1/n)) + B*a*e**m*x*x**m*x**n*lerchphi(d
*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*n*gamma(m/n + 2 + 1/n)) + B*a*e**m*x*x**m*x
**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*n**2*gamma(m/n + 2 + 1/n)) +
B*b*e**m*m*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 2 + 1/n)*gamma(m/n + 2 + 1/n)/(c*n**2*g
amma(m/n + 3 + 1/n)) + 2*B*b*e**m*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 2 + 1/n)*gamma(m
/n + 2 + 1/n)/(c*n*gamma(m/n + 3 + 1/n)) + B*b*e**m*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n
+ 2 + 1/n)*gamma(m/n + 2 + 1/n)/(c*n**2*gamma(m/n + 3 + 1/n))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B x^{n} + A\right )}{\left (b x^{n} + a\right )} \left (e x\right )^{m}}{d x^{n} + c}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate((B*x^n + A)*(b*x^n + a)*(e*x)^m/(d*x^n + c), x)